<!-- 入驻列表 -->
<style>
	th {
		text-align: center;
	}
	
	.table>tbody>tr>td {
		
		text-align: center;
		
		margin: 0px;
	}
</style>
<!-- 省市三级连动 -->
<script src="__PUBLIC__/ganged/Js/jquery.js"></script>
<script src="__PUBLIC__/ganged/Js/city-picker.data.js"></script>
<script src="__PUBLIC__/ganged/Js/city-picker.js"></script>
<script src="__PUBLIC__/ganged/Js/main.js"></script>
<!-- css -->
<link href="__PUBLIC__/ganged/Css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/ganged/Css/city-picker.css" rel="stylesheet" type="text/css" />


<div id="data_page" class="in_page">
		<div class="panel panel-default">
			<div class="panel-body">
				<form class="form-inline" method="get" name="keyword" id="keyword">
					
					<div class="form-group" style="float:left; margin-left: 20px;">
						<input type="text" class="form-control"  name="key" placeholder="入驻店铺名">
						<button type="submit" class="btn btn-sm btn-default">搜索</button>
					</div>
				</form>
			</div>
		</div>
		
	<table class="table table-striped table-bordered table-condensed ">
		<thead>
			<tr>
				<th>店主</th>
				<th>店铺名</th>	
				<th>电话</th>	
				
				
				<th>状态</th>
				
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list" id="li">
				<tr>
					<td >{$li.name}</td>
					<td>{$li.shopname}</td>
					<td>{$li.phone}</td>
					
					
					<td>
						<if condition="$li.status eq '0'"><font color="green">未审核</font></if>
						<if condition="$li.status eq '2'"><font color="red">未通过</font></if>
					</td>
					
					<td width="200">
						<a href="{:U('RuZhu/show')}?id={$li.id}" style="display: block; float: left;">
						<button type="button" class="btn btn-sm btn-primary show" d_id="{$li.id}" >查看资料</button>
						</a>
						<button type="button" class="btn btn-sm btn-success allow" d_id="{$li.id}" >通过</button>
						<button type="button" class="btn btn-sm btn-danger refuse" d_id="{$li.id}">拒绝</button>
					</td>
				</tr>
			</volist>
		</tbody>
	</table>
</div>

<div id="img" style="display:none">
  <div class="container-fluid">
  <div class="row-fluid">
    <div class="span12">       
         
     
      </div>
    </div>
  </div>
</div>
<style>
	#img{
	  width:600px;
	  height:400px;
	  position: absolute;
	  top:5%;
	  left:30%;
	  background-color: #FFFFFF;
	  border-radius: 10px;
	  box-shadow:10px 10px 10px 5px #888888;
	}
	#tuichu{
		position: absolute;
		right:0px;
		bottom:0px;
	}
</style>
<script>
	$(function(){
		//通过
		$(".allow").click(function(){
			var id=$(this).attr("d_id");
			var url = "{:U('RuZhu/allow')}?id="+id;
			if(confirm("确认通过吗?")){
				$.get(url,function(obj){
					if(obj.s){
						alert(obj.m);
						location.reload();
					}
				})
			}
			return false;
		})
		//拒绝
		$(".refuse").click(function(){
			var id=$(this).attr("d_id");
			var url = "{:U('RuZhu/refuse')}?id="+id;
				$.get(url,function(obj){
					if(obj.s){
						alert(obj.m);
						location.reload();
					}
				})
		})

	})

</script>
